﻿using System.ComponentModel;
using System.Runtime.Serialization;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;
using BLToolkit.Validation;

namespace Calendar.Logic.ObjectModel
{
    [DataContract, MapField("ENF_ID", "ID"), TableName("EVENTNOTIFICATIONS")]
    public abstract class EventNotification : Entity
    {
        [MapField("ENF_USER"), DisplayName("Менеджер"), Required]
        public abstract int User { get; set; }

        [MapField("ENF_EVENT"), DisplayName("Событие"), Required]
        public abstract int Event { get; set; }

        [MapField("ENF_WHEN"), DisplayName("Когда уведомить"), Required]
        public abstract int When { get; set; }

        [MapField("ENF_TITLE"), DisplayName("Название уведомления"), Required]
        public abstract string Title { get; set; }

        [MapField("ENF_SENT"), DisplayName("Отправлено"), Required]
        public abstract bool Sent { get; set; }

        [MapField("ENF_ISEMAIL"), DisplayName("Уведомить по email"), Required]
        public abstract bool IsEmail { get; set; }
    }

}
